import request from '@/utils/request'

// 查询列表
export function listType(query) {
  return request({
    url: '/fjfd/Devices/adminInterfaceList',
    method: 'get',
    params: query
  })
}

// 查询字典类型详细
export function getType(dictId) {
  return request({
    url: '/fjfd/Devices/' + dictId,
    method: 'get'
  })
}

// 新增字典类型
export function addType(data) {
  return request({
    url: '/fjfd/Devices/add',
    method: 'post',
    data: data
  })
}

// 修改字典类型
export function updateType(data) {
  return request({
    url: '/fjfd/Devices/edit',
    method: 'put',
    data: data
  })
}

// 失效字典类型
export function delType(dictId) {
  return request({
    url: '/fjfd/Devices/delete/' + dictId,
    method: 'delete'
  })
}

// 还原字典类型
export function hyType(dictId) {
    return request({
      url: '/fjfd/Devices/restore/' + dictId,
      method: 'delete'
    })
  }

// 查询所属单位编码集合
export function findOrgList(query) {
  return request({
    url: '/fjfd/Devices/findOrgList',
    method: 'get',
    params: query
  })
}